from django.contrib import admin
from .models import Appointment

@admin.register(Appointment)
class AppointmentAdmin(admin.ModelAdmin):
    """预约管理"""
    list_display = ('id', 'patient_id', 'doctor_name', 'hospital_name', 'department', 
                   'appointment_date', 'time_slot', 'fee', 'status')
    list_filter = ('status', 'hospital_name', 'department', 'appointment_date')
    search_fields = ('doctor_name', 'hospital_name', 'department')
    date_hierarchy = 'appointment_date'
